//
//  LBCommonModel.h
//  LandCredit
//
//  Created by 段新瑞 on 2019/9/30.
//  Copyright © 2019 Mr.Xr. All rights reserved.
//

#import <Foundation/Foundation.h>

@interface XRCommonModel : NSObject

@property (nonatomic, copy) NSString *success;
@property (nonatomic, copy) NSString *error;
@property (nonatomic) id data;
@property (nonatomic, readonly) BOOL isSuccess;


/**
 * 根据返回数据生成LBCommonModel对象
 * cls: 对应的data所属的类, data不为单纯的数组，若为单纯的数组，调用commonModelWithKeyValues:dataArrayClass:
 */
+ (instancetype)commonModelWithKeyValues:(id)keyValues dataClass:(Class)cls;

/**
 * 根据返回数据生成LBCommonModel对象
 * data为单纯数组中元素所对应的类
 */
+ (instancetype)commonModelWithKeyValues:(id)keyValues dataArrayClass:(Class)cls;

@end
